package com.shrct.businessprocess.project.events;

import com.shrct.businessprocess.project.RCSalesAssignment;
import com.shrct.businessprocess.project.events.RCSalesAssignmentEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.project.events.RCSalesAssignmentEventsManager")
public class RCSalesAssignmentEventsManager extends EntityEventsManager<RCSalesAssignment> {
  @Autowired(required = false)
  private Collection<RCSalesAssignmentEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<RCSalesAssignmentEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireLeave(final RCSalesAssignment entity, final Date leaveDate) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCSalesAssignmentEventsListener)listener).leave(entity,leaveDate);
    }
    
  }
}
